package game.chips;


import game.Player;

public class ChipsFactory {
    private final static ChipsFactory INSTANCE = new ChipsFactory();

    private ChipsFactory() {

    }

    public static ChipsFactory getInstance() {
        return INSTANCE;
    }

    public Chip getChip(Color color, Player player) {
        switch (color) {
            case WHITE:
                return new WhiteChip(player);

            case BLACK:
                return new BlackChip(player);

            default:
                throw new IllegalStateException("Unsupported color: " + color);

        }
    }
}
